package cn.edu.zafu.bigdata.x.sxy;

import java.util.HashMap;

public class StudentGradeManager {
    private final HashMap<String, Integer> gradeMap;

    public StudentGradeManager() {
        gradeMap = new HashMap<>();
    }

    public void addStudent(String name, int grade) {
        gradeMap.put(name, grade);
    }

    public int getGrade(String name) {
        return gradeMap.getOrDefault(name, -1);
    }

    public void removeStudent(String name) {
        gradeMap.remove(name);
    }
}

